package Afternoon;

import java.util.HashMap;
import java.util.Map;
import java.util.Set;

public class Test {

    public static void main(String[] args) {


        int id = 0;
        HashMap<Integer, Student> res = new HashMap<>();


        res.put(++id, new Student("张飞", 23, "男"));
        res.put(++id, new Student("关羽", 30, "男"));
        res.put(++id, new Student("曹操", 40, "男"));
        res.put(++id, new Student("赵飞燕", 22, "女"));

        Set<Map.Entry<Integer, Student>> end = res.entrySet();

        for (Map.Entry<Integer, Student> inte: end) {

            System.out.println(inte.getKey()+"-------------"+inte.getValue());

        }



    }
}
